/* ---------- dialog ---------- */
/* 动画 */
@-webkit-keyframes wi-dialog-fadeout {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes wi-dialog-fadeout {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@-webkit-keyframes wi-dialog-fadein {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes wi-dialog-fadein {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-webkit-keyframes wi-dialog-flyin {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}
@keyframes wi-dialog-flyin {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    -ms-transform: translateY(-40px);
    transform: translateY(-40px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
  }
}
@-webkit-keyframes wi-dialog-flyout {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }
}
@keyframes wi-dialog-flyout {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
    -ms-transform: translateY(0);
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    -ms-transform: translateY(-40px);
    transform: translateY(-40px);
  }
}
body.wi-dialog-open {
  overflow: hidden;
}
.wi-dialog {
  position: relative;
}
/* 遮罩层 */
.wi-dialog-overlay {
  position: fixed;
  background: rgba(0, 0, 0, 0.15);
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  -webkit-animation: wi-dialog-fadein 0.2s;
  animation: wi-dialog-fadein 0.2s;
}
.wi-dialog-closing > .wi-dialog-overlay {
  -webkit-backface-visibility: hidden;
  -webkit-animation: wi-dialog-fadeout 0.2s;
  animation: wi-dialog-fadeout 0.2s;
}
/* wi-dialog-main */
.wi-dialog-main {
  position: fixed;
  left: 50%;
  top: 50%;
  background: #ffffff;
  border-radius: 5px;
  border: solid 1px #cccccc;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-animation: wi-dialog-fadein 0.2s;
  animation: wi-dialog-fadein 0.2s;
  -moz-box-shadow: 2px 2px 10px 0 rgba(128, 128, 128, 0.3);
  -webkit-box-shadow: 2px 2px 10px 0 rgba(128, 128, 128, 0.3);
  box-shadow: 2px 2px 10px 0 rgba(128, 128, 128, 0.3);
}
.wi-dialog-closing > .wi-dialog-main {
  -webkit-animation: wi-dialog-flyout 0.2s;
  animation: wi-dialog-flyout 0.2s;
}
/* wi-dialog-main: head */
.wi-dialog-head {
  font-size: 12px;
  font-weight: bold;
  color: #575765;
  background-color: #f5f5f5;
  background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.06) 100%);
  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.06) 100%);
  width: 100%;
  padding: 0 5px 0 10px;
  height: 30px;
  line-height: 30px;
  position: relative;
}
:not(.wi-dialog-head) > .wi-dialog-close {
  top: 5px;
}
.wi-dialog-close {
  position: absolute;
  right: 8px;
  color: #808080;
  cursor: pointer;
}
.wi-dialog-close:hover,
.wi-dialog-close:active {
  color: #333333;
}
/* wi-dialog-main: content */
.wi-dialog-content {
  margin: 0 auto;
  padding: 10px;
  position: relative;
  overflow: auto;
  width: 100%;
  height: 100%;
}
.wi-dialog-head + .wi-dialog-content {
  height: calc(100% - 30px);
}
